/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.kimstore.bean;

import java.util.Date;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.OneToOne;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 *
 * @author Administrator
 */
@Entity
@Table(name="repair_detail")
public class RepairDetail {

    public static final String PULL_OUT = "Release";
    public static final String REPLACEMENT = "Replacement";
    public static final String RELEASE = "Release";
    public static final String REFUND = "Refund";
    public static final String IN_REPAIR = "In Repair";
    public static final String REPAIRED = "Release";
    
    @Id
    @GeneratedValue(strategy = GenerationType.AUTO)
    private int id;
    
    @OneToOne
    @JoinColumn(name = "staff_id", nullable = false)
    private Staff staff;
    
    @Column(name = "customer_name")
    private String customerName;
    
    @Column(columnDefinition="TEXT")
    private String address;
    
    @Column(name = "contact_information")
    private String contactInformation;
    
    @Column(name = "email_address")
    private String emailAddress;
    
    @Temporal(TemporalType.TIMESTAMP)
    @Column(name="receive_date")
    private Date receiveDate;
    
    @Temporal(TemporalType.TIMESTAMP)
    @Column(name="release_date")
    private Date releaseDate;
    
    @Column(columnDefinition="TEXT")
    private String accessories;
    
    @Column(name = "reason_for_repair",columnDefinition="TEXT")
    private String reasonForRepair;
    
    @Column(name = "work_done",columnDefinition="TEXT")
    private String workDone;
    
    @Column(name = "parts_cost")
    private Float partsCost;
    
    @Column(name = "labor_cost")
    private Float laborCost;
    
    @Column(name = "additional_cost")
    private Float additionalCost;
    
    @Column(name = "current_status")
    private String currentStatus;
    
    @Column(name="verdict")
    private String verdict;
    
    @OneToOne(cascade = CascadeType.ALL)
    @JoinColumn(name="replacement_id")
    private Item replacement;

    public Staff getStaff() {
        return staff;
    }

    public void setStaff(Staff staff) {
        this.staff = staff;
    }

    public Date getReceiveDate() {
        return receiveDate;
    }

    public void setReceiveDate(Date receiveDate) {
        this.receiveDate = receiveDate;
    }

    public Date getReleaseDate() {
        return releaseDate;
    }

    public void setReleaseDate(Date releaseDate) {
        this.releaseDate = releaseDate;
    }

    public String getAccessories() {
        return accessories;
    }

    public void setAccessories(String accessories) {
        this.accessories = accessories;
    }

    public String getReasonForRepair() {
        return reasonForRepair;
    }

    public void setReasonForRepair(String reasonForRepair) {
        this.reasonForRepair = reasonForRepair;
    }

    public String getWorkDone() {
        return workDone;
    }

    public void setWorkDone(String workDone) {
        this.workDone = workDone;
    }

    public String getCurrentStatus() {
        return currentStatus;
    }

    public void setCurrentStatus(String currentStatus) {
        this.currentStatus = currentStatus;
    }

    public String getCustomerName() {
        return customerName;
    }

    public void setCustomerName(String customerName) {
        this.customerName = customerName;
    }

    public String getAddress() {
        return address;
    }

    public void setAddress(String address) {
        this.address = address;
    }

    public String getContactInformation() {
        return contactInformation;
    }

    public void setContactInformation(String contactInformation) {
        this.contactInformation = contactInformation;
    }

    public String getEmailAddress() {
        return emailAddress;
    }

    public void setEmailAddress(String emailAddress) {
        this.emailAddress = emailAddress;
    }

    public Float getPartsCost() {
        return partsCost;
    }

    public void setPartsCost(Float partsCost) {
        this.partsCost = partsCost;
    }

    public Float getLaborCost() {
        return laborCost;
    }

    public void setLaborCost(Float laborCost) {
        this.laborCost = laborCost;
    }

    public Float getAdditionalCost() {
        return additionalCost;
    }

    public void setAdditionalCost(Float additionalCost) {
        this.additionalCost = additionalCost;
    }

    public String getVerdict() {
        return verdict;
    }

    public void setVerdict(String verdict) {
        this.verdict = verdict;
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public Item getReplacement() {
        return replacement;
    }

    public void setReplacement(Item item) {
        this.replacement = item;
    }
    
    
    
}
